namespace Leo.Core.Swagger
{
    public class ApiDocOptions
    {
        public const string ApiDoc = "ApiDoc";

        public string Title { get; set; }

        public string Author { get; set; }

        public List<Group> ApiList { get; set; }
    }

    public class Group
    {
        public string Name { get; set; }
        public string Title { get; set; }
        public string Description { get; set; }
        public string Version { get; set; }

        public OpenApiInfoEx ToOpenApiInfo()
        {
            var openApiInfo = new OpenApiInfoEx
            {
                Title = Title,
                Description = Description,
                Version = Version,
                Group = Name
            };
            return openApiInfo;
        }
    }
}